package bf.program;

import org.objectweb.asm.MethodVisitor;

public class CommandBlock extends CompiableCode {

	Command[] cmdList;
	
	public CommandBlock(Command[] cmdList) {
		this.cmdList = cmdList;
	}

	@Override
	public void iexecute(State state) {
		for(Command cmd: cmdList) {
			cmd.execute(state);
		}
	}

	@Override
	public void genCode(MethodVisitor mv) {
		for(Command cmd: cmdList){
			cmd.genCode(mv);
		}
	}

}
